package com.study.springboot.service.impl;

import com.study.springboot.service.MultipleEnvironmentsService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;

/**
 * @author wei.zhao
 * @description:
 * @date 2021年12月03日 15:33
 */
@Profile("prod")
@Service
public class ProdMultipleEnvironmentsServiceImpl implements MultipleEnvironmentsService {

    @Value("${profile.name}")
    String profileName;

    @Override
    public String testMultipleEnvironments() {
        return "生产环境下使用的业务实现类，当前配置文件名：" + profileName;
    }

}
